<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 设计 Goal 解析器 -->
    <script>
      var interpret = function (command) {
        var str = command.replaceAll('()', 'o')
        str = str.replaceAll('(al)', 'al')
        return str
      }
      console.log(interpret('G()(al)'))
    </script>
  </body>
</html>
